program main

    integer :: i
    integer, allocatable :: a(:)

    a = [(i, i=1, 10)]              ! RHS 自动分配
    print *, 'a(4:6) = ', a(4:6)    ! a(4:6) =  4  5  6

end program main
